<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let date = "2024-10-21";
      let [year, month, day] = date.split("-"); //[2024,10,21]
      console.log(year, month, day);
    </script>
  </body>
</html>
